import { getNow, actions } from '../actions/actionSyncDemo';


const InitialData = {
  now: getNow(),
};


interface IHomePageState {
  data: string;
  type: symbol;
}

function reducer(state = {}, action: IHomePageState) {
  var newState = { ...InitialData, ...state };
  var data = action ? action.data : {};

  switch (action.type) {
    case actions['CHANGE_NOW']:
      newState.now = action.data;
      break;
  }
  return newState;
}

export default reducer